package org.cloud.shop.gateway.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class TestController {

	@RequestMapping(value="/test")
	@PreAuthorize("hasRole('ROLE_ADMIN')")
	public static void testHello() {
		System.out.println("say hello");
		
	}
}
